package com.java2007.hotel.constant;

/**
 * @author Reckeys
 * @version V1.0
 * @date 2021/01/26
 **/
public interface ServletConstant {
    /**
     * 请求参数对应的功能
     */
    String METHOD = "method";
    /**
     * 转发前缀
     */
    String FORWARD = "forward:";
    /**
     * 重定向前缀
     */
    String REDIRECT = "redirect:";

    /**
     * 标识分隔符
     */
    String COLON = ":";

    /**
     * 公共的错误消息
     */
    String ERROR_MESSAGE = "<script>alert('服务器正忙，请稍后重试');location.href='index.jsp'</script>";

    /**
     * 弹窗后跳转
     */
    public static String jump(String message,String href){
        return "<script>alert('" + message + "');location.href='" + href + "'</script>";
    }
}
